// [[ OnflowGenerator Entity UUID: fcad6704b800470bb427a3f4c78b23fb ]]
package com.itdct.onflow.system.monitor.entity

import com.baomidou.mybatisplus.annotation.TableName
import com.itdct.onflow.core.annotation.Column
import com.itdct.onflow.core.annotation.ColumnRelateDict
import com.itdct.onflow.core.annotation.TableDescription
import com.itdct.onflow.core.entity.BaseEntity
import java.math.BigDecimal
import java.util.*

/**
 * @author Zhouwx
 * @date 2025/10/11 16:52:34
 * @version 1.0
 * @description
 */
@TableDescription("服务器信息")
@TableName("sys_machine_info")
class SysMachineInfoEntity : BaseEntity() {
    @Column(comment = "服务器id", nullable = false, unique = true, length = 50, sort = 10, forSelect = true)
    var machineId = ""

    @Column(comment = "服务器ip地址", nullable = false, length = 64, sort = 20)
    var ipAddress = ""

    @Column(comment = "服务器mac地址", nullable = false, length = 64, sort = 25)
    var macAddress = ""

    @Column(comment = "上次上报时间", sort = 30)
    var lastReportDate: Date? = null

    @ColumnRelateDict(dictCode = "sysMachineOnlineState")
    @Column(comment = "在线状态", nullable = false, defaultValue = "0", sort = 40)
    var onlineState = 0

    @Column(comment = "操作系统名称", length = 100, sort = 50)
    var osName = ""

    @Column(comment = "服务器名称", length = 100, sort = 55)
    var serverName: String? = null

    @Column(comment = "序列号", length = 100, sort = 60)
    var sn: String? = null

    @Column(comment = "CPU名称", length = 100, sort = 70)
    var cpuName: String? = null

    @Column(comment = "CPU频率", length = 100, sort = 75)
    var cpuFrequency: String? = null

    @Column(comment = "CPU物理核心数", nullable = false, defaultValue = "0", sort = 80)
    var physicalProcessorCount = 0

    @Column(comment = "CPU逻辑核心数", nullable = false, defaultValue = "0", sort = 90)
    var logicalProcessorCount = 0

    @Column(comment = "物理内存", nullable = false, defaultValue = "0", sort = 100)
    var physicalMemory = 0

    @Column(comment = "虚拟内存", nullable = false, defaultValue = "0", sort = 110)
    var virtualMemory = 0

    @Column(comment = "总存储", nullable = false, defaultValue = "0", length = 20, decimal = 2, sort = 120)
    var totalStorage: BigDecimal? = null

}